1. Field of the Invention
The present invention relates to an image data compression coding technique.
2. Description of the Related Art
Conventionally, a JPEG method using discrete cosine transformation or a method using Wavelet transformation is often used as a still image compression method. These encoding methods segment an image into specific encoding blocks and execute discrete cosine transformation or Wavelet transformation for each block. Hence, a parallel process in an image is relatively easy. In this case, for example, the process speed can be improved by increasing the degree of parallelism in hardware implementation.
A monochrome grayscale image contains only one component and has a small amount of information as compared to a color image expressed by a plurality of components. If such a grayscale image is encoded by a color image encoder, encoding is done assuming that the nonexistent components exist, resulting in perceptible redundancy. Since the time required to encode a monochrome grayscale image almost equals that required to encode a color image, the process efficiency is susceptible to improvement. This also applies to software implementation.
The following example is known as an arrangement for speeding up grayscale image processing by using an RGB encoder.
First, RGB→YCbCr color space conversion is executed for a grayscale image which has no color difference components. Color space conversion of a gray image area is done by setting the code amounts of color difference components to 0 and validating only the luminance component. After that, all processes after color space conversion are executed. This improves the process speed and encoding efficiency while avoiding waste in the process (e.g., Japanese Patent Laid-Open No. 2004-228952).
However, some image encoding methods and, more particularly, many lossless image encoding methods process not each block but each pixel sequentially. In, e.g., a JPEG-LS method, codes are determined by changing the mode depending on the states of neighboring pixels around a pixel of interest. If the degree of parallelism is to be increased in this method, a block process is necessary as in the above-described JPEG method. In addition, it is difficult to use a color encoder.
An encoding method for each pixel, represented by JPEG-LS, increases the compression efficiency by reducing the redundancy on the basis of correlation to neighboring pixels. Hence, an excessive block process for improving the speed leads to deterioration of the compression efficiency.
In a color image expressed by R, G, and B data, one pixel holds three R, G, and B components. The mode change timing and pattern dictionary updating for each pixel are done for a set of R, G, and B components. As far as a color image encoder is used, the encoding process cannot speed up in either a grayscale image containing one component or an image containing three components if the number of pixels remains unchanged.